package com.ssss.template.exec;

public class HummerH1  extends HummerModel{

    private boolean alarmFlag = true;

    @Override
    protected void start() {
        System.out.println("H1发动");
    }

    @Override
    protected void engineBoom() {
        System.out.println("H1轰鸣");
    }

    @Override
    protected void alarm() {
        System.out.println("H1鸣笛");
    }

    @Override
    protected void stop() {
        System.out.println("H1停止");
    }

    /**
     * 钩子方法
     * @return
     */
    protected boolean isAlarm(){
        return this.alarmFlag;
    }

    public void setAlarmFlag(boolean alarmFlag) {
        this.alarmFlag = alarmFlag;
    }
}
